PhCard = cc.Node.extend({
	ctor:function(p){
		this._super();
		p.addChild(this);
		this.init();
	},
	init:function(){
		this.setTag(TAG_PH_NODE);
		this.setCascadeOpacityEnabled(true);
		
		var card = new cc.Sprite("#color_card.png");
		card.setPosition(100, 0);
		this.addChild(card);
		
		this.phDtl = new cc.Sprite("#ph_dtl.png");
		card.setCascadeOpacityEnabled(true);
		this.phDtl.setPosition(50, 0)
		this.phDtl.setOpacity(0);
		card.addChild(this.phDtl);
		
		var ph = new Button(this, 8, TAG_PH, "#ph.png", this.callback);
	},
	changeColor:function(){
		var ph = this.getChildByTag(TAG_PH);
		ph.setCascadeOpacityEnabled(true);
		var ph2 = new cc.Sprite("#ph2.png");
		ph2.setAnchorPoint(0, 0);
		ph2.setOpacity(0);
		ph.addChild(ph2, 9);
		ph2.runAction(cc.fadeIn(0.5));
	},
	callback:function(p){
		switch(p.getTag()){
			case TAG_PH:
				var move = cc.moveTo(0.5, cc.p(82,20));
				var func1 = cc.callFunc(function(){
					this.phDtl.runAction(cc.fadeTo(0.5, 255));
				},this);
				var delay = cc.delayTime(1.5);
				var func2 = cc.callFunc(function(){
					this.runAction(cc.fadeTo(0.5,0));
					gg.flow.next();
				}.bind(this),this);
				var seq = cc.sequence(move, func1, delay, func2);
				p.runAction(seq);
				break;
		}
	}
});